package com.itheima.company.pojo.vo;

import com.itheima.company.pojo.Company;
import com.itheima.company.pojo.Department;
import lombok.*;

import java.util.List;

/**
 * @author IntelliJ IDEA
 * @date 2020/10/22  14:54
 */
@NoArgsConstructor
@EqualsAndHashCode
@ToString
@Getter
@Setter
public class DeptListResult {

    /**
     * 企业id
     */
    private String companyId;

    /**
     * 企业名称
     */
    private String companyName;

    /**
     * 企业联系人
     */
    private String companyManage;

    /**
     * 部门列表
     */
    private List<Department> depts;


    public DeptListResult(Company company,List<Department> depts){
        this.companyId=company.getId();
        this.companyName=company.getName();
        this.companyManage=company.getLegalRepresentative();
        this.depts=depts;
    }

}
